package com.se.frontline.managers;

public class GameManager {

	/*
	 * Since this class is a singleton, we must declare an instance of this
	 * class within itself. The singleton will be instantiated a single time
	 * during the course of an application's full life-cycle
	 */
	private static GameManager INSTANCE;

	private static final int INITIAL_SCORE = 0;
	private static final int INITIAL_BIRD_COUNT = 3;
	private static final int INITIAL_ENEMY_COUNT = 5;

	/*
	 * The game manager should keep track of certain data involved in our game.
	 * This particular game manager holds data for score, bird counts and enemy
	 * counts.
	 */
	private int mSelectedUnit;

	// The constructor does not do anything for this singleton
	GameManager() {
	}

	/*
	 * For a singleton class, we must have some method which provides access to
	 * the class instance. getInstance is a static method, which means we can
	 * access it globally (within other classes). If the GameManager has not yet
	 * been instantiated, we create a new one.
	 */
	public static GameManager getInstance() {
		if (INSTANCE == null) {
			INSTANCE = new GameManager();
		}
		return INSTANCE;
	}

	public void setSelectedUnit(int pSelectedUnit) {
		mSelectedUnit = pSelectedUnit;
	}

	public int getSelectedUnit() {
		return mSelectedUnit;
	}
}